msck repair table `jms_ods`.`ods_lgn_log`;
insert overwrite table jms_dwd.dwd_lgn_log_record_dt partition(dt)
select 
get_json_object(js_data,'$.id') as id
,get_json_object(js_data,'$.userId') as userId
,get_json_object(js_data,'$.userCode') as userCode
,get_json_object(js_data,'$.userName') as userName
,get_json_object(js_data,'$.networkId') as networkId
,get_json_object(js_data,'$.networkCode') as networkCode
,get_json_object(js_data,'$.networkName') as networkName
,get_json_object(js_data,'$.loginType') as loginType
,get_json_object(js_data,'$.appType') as appType
,get_json_object(js_data,'$.loginTime') as loginTime
,get_json_object(js_data,'$.loginStatus') as loginStatus
,get_json_object(js_data,'$.ip') as ip
,get_json_object(js_data,'$.ipCity') as ipCity
,get_json_object(js_data,'$.mac') as mac
,get_json_object(js_data,'$.remark') as remark
,get_json_object(js_data,'$.createTime') as createTime
,get_json_object(js_data,'$.traceId') as traceId
,get_json_object(js_data,'$.appDeviceId') as appDeviceId
,get_json_object(js_data,'$.loginWay') as loginWay
,get_json_object(js_data,'$.dept') as dept
,get_json_object(js_data,'$.post') as post
,get_json_object(js_data,'$.loginAddr') as loginAddr
,get_json_object(js_data,'$.appVersion') as appVersion
,get_json_object(js_data,'$.appPlatform') as appPlatform
,get_json_object(js_data,'$.deviceVersion') as deviceVersion
,get_json_object(js_data,'$.remote') as remote
,get_json_object(js_data,'$.franchiseeId') as franchiseeId
,get_json_object(js_data,'$.franchiseeCode') as franchiseeCode
,get_json_object(js_data,'$.franchiseeName') as franchiseeName
,get_json_object(js_data,'$.proxyNetworkId') as proxyNetworkId
,get_json_object(js_data,'$.proxyNetworkCode') as proxyNetworkCode
,get_json_object(js_data,'$.proxyNetworkName') as proxyNetworkName
,substr(dt,1,10) as dt
from
`jms_ods`.`ods_lgn_log` as t
where
substr(dt,1,10)='{{ execution_date | cst_ds }}';